<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>BOM 操作示例</title>
</head>
<body>

<h1>欢迎来到 BOM 操作演示页面</h1>

<button onclick="goBack()">返回上一页</button>
<button onclick="showDeviceInfo()">显示设备信息</button>
<button onclick="redirect()">跳转到新页面</button>
<button onclick="refreshPage()">刷新当前页面</button>

<script>
function goBack() {
    history.back();
}

function showDeviceInfo() {
    console.log(navigator.appVersion);
}

function redirect() {
    location.href = "https://www.example.com";
}

function refreshPage() {
    location.reload();
}
</script>

</body>
</html>